package com.buaa.controller;

import com.buaa.common.Result;
import com.buaa.service.impl.UserExtensionActivityServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

@RestController
@Controller
@RequestMapping("/userextlog")
public class UserExtensionActivityController {

    @Autowired
    private UserExtensionActivityServiceImpl userExtensionServiceImpl;

    @PostMapping("/del/batch/")
    public Result deleteBatch(@RequestBody List<Integer> ids, HttpServletRequest request){
        return null;//return userExtensionServiceImpl.deletUserExtByIds(ids, request);
    }


    @DeleteMapping("{id}")
    public Result deleteById(@PathVariable("id") Integer id, HttpServletRequest request){

        return null;//return userExtensionServiceImpl.deleteUserExtById(id, request);
    }



    @GetMapping("/page")
    public Map<String,Object> findPage(@RequestParam String policeId, @RequestParam String userName, @RequestParam Integer pageNum, @RequestParam Integer pageSize) {
        return userExtensionServiceImpl.findPageByPidAndUserName(policeId, userName, pageNum, pageSize);
    }



}
